<?php
/**
 * 发货单处理
 *
 * @category 
 * @package 
 * @author chenping<chenping@shopex.cn>
 * @version $Id: Z
 */
class erpapi_shop_matrix_alibaba_request_delivery extends erpapi_shop_request_delivery
{
    /**
     * 发货请求参数
     *
     * @return void
     * @author 
     **/
    protected function get_confirm_params($sdf)
    {
        $param = parent::get_confirm_params($sdf);

        // 子单
        $orderEntryIds = array();
        foreach ((array) $sdf['orderinfo']['order_objects'] as $object) {
            if($object['oid']) $orderEntryIds[] = $object['oid'];
        }

        $param['memberId']        = $sdf['orderinfo']['sellermemberid'];
        $param['orderEntryIds']   = implode(',', $orderEntryIds);
        $param['tradeSourceType'] = 'cbu-trade';
        $param['remarks']         = '';
        $param['ship_date']       = date('Y-m-d H:i:s',$sdf['delivery_time']);

        return $param;
    }
}